<?php $this->_extends('_layouts/main_layout'); ?>
<?php $this->_block('title'); ?>
<?php echo "Edit Advertiser"; ?>
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>
<div id="content" class="box">
	<h1>Edit Advertiser</h1>
		<?php if (isset($infos)) 
				{
					foreach ($infos as $info)
					{
		?>
				<p class="msg info"><?php echo $info;?></p>
		<?php		}
				}
		?>
		<fieldset>
			<legend>Edit Advertiser</legend>
		<?php if (isset($errors)) 
				{
					foreach ($errors as $error)
					{
		?>
				<p class="msg error"><?php echo $error;?></p>
		<?php		}
				}
		?>
			<form method="post" action="<?php echo url('advertiser/edit');?>">
				<input type="hidden" name="id" value="<?php echo $advertiser['id'];?>" />
				<label>Advertiser Name:</label><input type="text" name="name" value="<?php echo $advertiser['name'];?>"/><br/>
				<input type="submit" value="Update Advertiser" /> 
			</form>
		</fieldset>
		
</div>
<script type="text/javascript">
	$(function(){
		$('#another').click(function(){
			$(':button').before('<label>Advertiser Name:</label><input type="text" name="advertisers[]" /><br/>');
		});			
	});
</script>
<?php $this->_endblock(); ?>